package chapter4.lessons;

/**
 * @Project ：learn_java
 * @File ：SellTicketTest.java
 * @IDE ：IntelliJ IDEA
 * @Author ：自由如风间
 * @Date ：2025/3/5 21:42
 * @Description ：测试类，测试SellTicketDemo
 */

public class SellTicketTest {
    public static void main(String[] args) {
        // SellTicketDemoSolve01 st = new SellTicketDemoSolve01();
        // SellTicketDemoSolve02 st = new SellTicketDemoSolve02();
        // SellTicketDemoSolve03 st = new SellTicketDemoSolve03();

        SellTicketDemo02 st = new SellTicketDemo02();
        System.out.println("st = " + st);

        // 创建三个线程，充当三个售票机
        Thread t1 = new Thread(st, "一号售票机");
        Thread t2 = new Thread(st, "二号售票机");
        Thread t3 = new Thread(st, "三号售票机");

        // 启动线程
        t1.start();
        t2.start();
        t3.start();
    }
}
